let unionUserService = require('../../../services/unionUserServices').getInstance();


module.exports = function (app) {
    return new remote(app);
};

let remote = function (app) {
    this.app = app;
};
let pro = remote.prototype;

//获取所有上级
pro.getSpreaderUser = async (unionID, userID, cb) => {

    let list = await unionUserService.getSpreaderUser(unionID, userID);
    cb(null, list);

};

//获取所有下级
pro.getLowerUser = async (unionID, userID, cb) => {

    let list = await unionUserService.getLowerUser(unionID, userID);
    cb(null, list);

};